//VARS
int analogInputValue[6] = {0,0,0,0,0,0};
int i = 0;

//SERIAL INTEGER TO BYTE
                // 0   1   2   3   4   5   6   7
int binOut [] = {000,  1, 10, 11,100,101,110,111};
               // 4   6   2   1   7   5   0   3
int binIn [] =  {100,110, 10,  1,111,101,000, 11};
char inByte = 'B';
byte msB, lsB;
int serialInCount = 0;


void setup() {
  for (i = 0;i<6;i++) pinMode(i, INPUT);  
  // open the serial port at 9600 bps:
  Serial.begin(9600);
}

void loop() {

  // read the value on analog input
  if (Serial.available() > 0) {
    inByte = Serial.read();

    if (inByte == 'A') {  
      
      for (i = 0;i<6;i++) {
        analogInputValue[i] = analogRead(i);
        delay(10);
      }
      
      for (i = 0;i<6;i++) {
        msB = byte((analogInputValue[i] & 65280) >> 8);                     // 65280 = 0b1111111100000000
        lsB = byte(analogInputValue[i] & 255);                              // 255 =   0b0000000011111111
        Serial.print(msB,BYTE);
        Serial.print(lsB,BYTE);        
      }
      
     }
  }
}